#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <cstdlib>
#include <cstdio>

using namespace std;
const int max_n=10000;
const int max_m=10;

int dbs[max_n][max_m];
map<string, int> dbCache;
typedef pair<int,int> pair_group;

//different string have unique id;
int ID(const string& str)
{
	static int id = 0;
	if(!dbCache.count(str))
		dbCache[str]= id++;
	return dbCache[str];
}

int main()
{
	int m_cols=0,n_rows=0;

	scanf("%d %d",&m_cols,&n_rows);
	cin.ignore();
	string input_line;
	for(int i=0;i<n_rows;i++){
		getline(cin,input_line);
		//cout<<input_line<<endl;
		for(int j=0;j<m_cols;j++){
			int posi = input_line.find(",");
			if(posi){
				string sub_Str = input_line.substr(0,posi);
				input_line = input_line.substr(posi+1);
				dbs[i][j] = ID(sub_Str);
			} else {
				dbs[i][j] = ID(input_line);
			}
		}
	}
	for(int i=0;i<m_cols;i += 2){
		int c1 = i;
		int c2 = i+1;
		map<pair_group,int> d_map;
//		pair<string,pair<string,string> > line;
		for(int j=0;j<n_rows;j++){
			pair_group p = make_pair(dbs[j][c1],dbs[j][c2]);
			if(d_map.count(p)){
				cout<<"No"<<endl;
				cout<<c1<<" "<<c2<<endl;
				cout<<d_map[p]<<" "<<j+1<<endl;
				return 0;
			}else{
				d_map[p] = i;
			}
		}
	}
	cout<<"Yes"<<endl;
	return 0;
}
